﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="manage_guest.aspx.cs" Inherits="Com.CMS263.Web.manage.manage_guest" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link href="style/main.css" rel="stylesheet" type="text/css" />
    <link href="common/validator.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>
    <script language="javascript" type="text/javascript">
        var npage = 0;
        function checkPageNum(obj, obj2) {
            var num = $("#pagetext").val();
            var p = /^[1-9]\d*$/;

            if (num.length < 1) {
                alert("请输入要跳转的页码");

            }
            else if (!p.exec(num)) {
                $("#pagetext").attr("value", 1);
                alert("要跳转的页码请输入正整数");
            }
            else if (num > obj) {
                $("#pagetext").attr("value", obj);
                npage = obj;

            }
            else if (num < 1) {
                $("#pagetext").attr("value", 1);
                npage = 1;

            }
            else {

            }

        }
        function pageUrl(obj) {

            window.location.href = '?page=' + $("#pagetext").val() + "&type=" + obj;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_1">
            <tr>
                <td height="23" colspan="2" class="table_2">
               <a href="add_guest.aspx">添加</a>&nbsp; &nbsp;   VIP用户管理
                </td>
            </tr>
            <tr>
                <td class="tdside" align="center">
                    <asp:GridView ID="GridView1" Width="100%" runat="server" AutoGenerateColumns="False"
                        OnRowCommand="GridView1_RowCommand" AllowPaging="True">
                        <Columns>
                            <asp:BoundField DataField="userName" HeaderText="用户名" SortExpression="userName" />
                            <asp:BoundField DataField="userId" HeaderText="VIP编号" SortExpression="userId" />
                            <asp:TemplateField HeaderText="加入时间" SortExpression="AddDate">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%#Eval("AddDate","{0:d}") %>'></asp:Label>
                                </ItemTemplate>
                                
                            </asp:TemplateField>
                            <asp:BoundField DataField="realName" HeaderText="姓名" SortExpression="realName" />
                            <asp:BoundField DataField="userPass" HeaderText="密码" SortExpression="userPass" />
                            <asp:TemplateField HeaderText="审核状态">
                                <ItemTemplate>
                                    <%#Eval("state").ToString().ToLower().Equals("true")?"<span style='color:red'>已审核</span>":"未审核" %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="添加认购">
                                <ItemTemplate>
                                    <asp:Button Width="40px" ID="btnRenGou" runat="server" CommandArgument='<%#Eval("id") %>' CommandName="btnRen"
                                        Text="认购" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="添加赎回">
                                <ItemTemplate>
                                    <asp:Button Width="40px"  ID="btnShuHui" runat="server" CommandArgument='<%#Eval("id") %>' CommandName="btnShu"
                                        Text="赎回" />
                                </ItemTemplate>
                            </asp:TemplateField>
                             <asp:TemplateField HeaderText="添加分红">
                                <ItemTemplate>
                                    <asp:Button Width="40px"  ID="btnFenHong" runat="server" CommandArgument='<%#Eval("id") %>' CommandName="btnFH"
                                        Text="分红" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="交易记录">
                                <ItemTemplate>
                                    <asp:Button Width="60px"  ID="btnDeal" runat="server" CommandArgument='<%#Eval("id") %>' CommandName="btnDeal"
                                        Text="交易记录" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="详细">
                                <ItemTemplate>
                                    <asp:Button Width="40px"  ID="btnEdit" runat="server" CommandArgument='<%#Eval("id") %>' CommandName="btnEdit"
                                        Text="详细" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="删除">
                                <ItemTemplate>
                                    <asp:Button Width="40px"  ID="btnDel" runat="server" CommandArgument='<%#Eval("id") %>' CommandName="btnDel"
                                        Text="删除" OnClientClick='return confirm("确认删除吗？");' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="tdside" align="right">
                    <%=GetPager() %>
                </td>
            </tr>
        </table>
        
    </div>
    </form>
</body>
</html>
